import pandas as pd
from sqlalchemy import create_engine


#   建立与mysql的连接     这里需要禁用ssl安全协议
connect=create_engine('mysql+mysqlconnector://root:123456@192.168.67.193:3307/dws?ssl_disabled=True&charset=utf8mb4')
#   low_memory=False
data=pd.read_sql("select * from top5_product",connect)

data.to_csv("datas/top5_product(热门商品top5).csv",index=False)